﻿Imports Microsoft.VisualBasic
''' <summary>
''' Object that represents an IPN request from PayPal
''' </summary>
''' <remarks>Not all properties of an IPN reuqest have been implementd</remarks>
<Serializable()> _
Public Class IPNRequest
    Private _amount As Double = 0
    Private _amount_per_cycle As Double = 0
    Private _business As String = String.Empty
    Private _charset As String = String.Empty
    Private _currency_code As String = String.Empty
    Private _custom As String = String.Empty
    Private _first_name As String = String.Empty
    Private _handling_amount As Double = 0
    Private _initial_payment_amount As Double = 0
    Private _initial_payment_status As String = String.Empty
    Private _initial_payment_txn_id As String = String.Empty
    Private _item_name As String = String.Empty
    Private _item_number As String = String.Empty
    Private _last_name As String = String.Empty
    Private _mc_currency As String = String.Empty
    Private _mc_fee As Double = 0
    Private _mc_gross As Double = 0
    Private _next_payment_date As Date = Nothing
    Private _notify_version As String = String.Empty
    Private _outstanding_balance As String = String.Empty
    Private _payer_id As String = String.Empty
    Private _payer_status As String = String.Empty
    Private _payment_cycle As String = String.Empty
    Private _payment_fee As Double = 0
    Private _payment_gross As Double = 0
    Private _payment_type As String = String.Empty
    Private _period_type As String = String.Empty
    Private _product_name As String = String.Empty
    Private _product_type As String = String.Empty
    Private _profile_status As String = String.Empty
    Private _protection_eligibility As String = String.Empty
    Private _quantity As Integer = 0
    Private _receipt_id As String = String.Empty
    Private _receiver_email As String = String.Empty
    Private _receiver_id As String = String.Empty
    Private _recurring_payment_id As String = String.Empty
    Private _residence_country As String = String.Empty
    Private _shipping As String = String.Empty
    Private _tax As Double = 0
    Private _test_ipn As String = String.Empty
    Private _time_created As Date = Nothing
    Private _transaction_subject As String = String.Empty
    Private _txn_type As String = String.Empty
    Private _verify_sign As String = String.Empty



    Public Property Payment_cycle() As String
        Get
            Return _payment_cycle
        End Get
        Set(ByVal value As String)
            _payment_cycle = value
        End Set
    End Property

    Public Property Txn_type() As String
        Get
            Return _txn_type
        End Get
        Set(ByVal value As String)
            _txn_type = value
        End Set
    End Property

    Public Property Last_name() As String
        Get
            Return _last_name
        End Get
        Set(ByVal value As String)
            _last_name = value
        End Set
    End Property

    Public Property Initial_payment_status() As String
        Get
            Return _initial_payment_status
        End Get
        Set(ByVal value As String)
            _initial_payment_status = value
        End Set
    End Property

    Public Property Next_payment_date() As Date
        Get
            Return _next_payment_date
        End Get
        Set(ByVal value As Date)
            _next_payment_date = value
        End Set
    End Property

    Public Property Residence_country() As String
        Get
            Return _residence_country
        End Get
        Set(ByVal value As String)
            _residence_country = value
        End Set
    End Property

    Public Property Currency_code() As String
        Get
            Return _currency_code
        End Get
        Set(ByVal value As String)
            _currency_code = value
        End Set
    End Property

    Public Property Time_created() As Date
        Get
            Return _time_created
        End Get
        Set(ByVal value As Date)
            _time_created = value
        End Set
    End Property

    Public Property Verify_sign() As String
        Get
            Return _verify_sign
        End Get
        Set(ByVal value As String)
            _verify_sign = value
        End Set
    End Property

    Public Property Period_type() As String
        Get
            Return _period_type
        End Get
        Set(ByVal value As String)
            _period_type = value
        End Set
    End Property

    Public Property Payer_status() As String
        Get
            Return _payer_status
        End Get
        Set(ByVal value As String)
            _payer_status = value
        End Set
    End Property

    Public Property Test_ipn() As String
        Get
            Return _test_ipn
        End Get
        Set(ByVal value As String)
            _test_ipn = value
        End Set
    End Property

    Public Property Tax() As Double
        Get
            Return _tax
        End Get
        Set(ByVal value As Double)
            _tax = value
        End Set
    End Property

    Public Property First_name() As String
        Get
            Return _first_name
        End Get
        Set(ByVal value As String)
            _first_name = value
        End Set
    End Property

    Public Property Receiver_email() As String
        Get
            Return _receiver_email
        End Get
        Set(ByVal value As String)
            _receiver_email = value
        End Set
    End Property

    Public Property Payer_id() As String
        Get
            Return _payer_id
        End Get
        Set(ByVal value As String)
            _payer_id = value
        End Set
    End Property

    Public Property Product_type() As String
        Get
            Return _product_type
        End Get
        Set(ByVal value As String)
            _product_type = value
        End Set
    End Property

    Public Property Initial_payment_txn_id() As String
        Get
            Return _initial_payment_txn_id
        End Get
        Set(ByVal value As String)
            _initial_payment_txn_id = value
        End Set
    End Property

    Public Property Shipping() As String
        Get
            Return _shipping
        End Get
        Set(ByVal value As String)
            _shipping = value
        End Set
    End Property

    Public Property Amount_per_cycle() As Double
        Get
            Return _amount_per_cycle
        End Get
        Set(ByVal value As Double)
            _amount_per_cycle = value
        End Set
    End Property

    Public Property Profile_status() As String
        Get
            Return _profile_status
        End Get
        Set(ByVal value As String)
            _profile_status = value
        End Set
    End Property

    Public Property Charset() As String
        Get
            Return _charset
        End Get
        Set(ByVal value As String)
            _charset = value
        End Set
    End Property

    Public Property Notify_version() As String
        Get
            Return _notify_version
        End Get
        Set(ByVal value As String)
            _notify_version = value
        End Set
    End Property

    Public Property Amount() As Double
        Get
            Return _amount
        End Get
        Set(ByVal value As Double)
            _amount = value
        End Set
    End Property

    Public Property Outstanding_balance() As String
        Get
            Return _outstanding_balance
        End Get
        Set(ByVal value As String)
            _outstanding_balance = value
        End Set
    End Property

    Public Property Recurring_payment_id() As String
        Get
            Return _recurring_payment_id
        End Get
        Set(ByVal value As String)
            _recurring_payment_id = value
        End Set
    End Property

    Public Property Product_name() As String
        Get
            Return _product_name
        End Get
        Set(ByVal value As String)
            _product_name = value
        End Set
    End Property

    Public Property Mc_gross() As Double
        Get
            Return _mc_gross
        End Get
        Set(ByVal value As Double)
            _mc_gross = value
        End Set
    End Property

    Public Property Protection_eligibility() As String
        Get
            Return _protection_eligibility
        End Get
        Set(ByVal value As String)
            _protection_eligibility = value
        End Set
    End Property

    Public Property Mc_fee() As Double
        Get
            Return _mc_fee
        End Get
        Set(ByVal value As Double)
            _mc_fee = value
        End Set
    End Property

    Public Property [Custom]() As String
        Get
            Return _custom
        End Get
        Set(ByVal value As String)
            _custom = value
        End Set
    End Property

    Public Property Business() As String
        Get
            Return _business
        End Get
        Set(ByVal value As String)
            _business = value
        End Set
    End Property

    Public Property Quantity() As Integer
        Get
            Return _quantity
        End Get
        Set(ByVal value As Integer)
            _quantity = value
        End Set
    End Property

    Public Property Payment_type() As String
        Get
            Return _payment_type
        End Get
        Set(ByVal value As String)
            _payment_type = value
        End Set
    End Property

    Public Property Payment_fee() As Double
        Get
            Return _payment_fee
        End Get
        Set(ByVal value As Double)
            _payment_fee = value
        End Set
    End Property

    Public Property Receiver_id() As String
        Get
            Return _receiver_id
        End Get
        Set(ByVal value As String)
            _receiver_id = value
        End Set
    End Property

    Public Property Item_name() As String
        Get
            Return _item_name
        End Get
        Set(ByVal value As String)
            _item_name = value
        End Set
    End Property

    Public Property Mc_currency() As String
        Get
            Return _mc_currency
        End Get
        Set(ByVal value As String)
            _mc_currency = value
        End Set
    End Property

    Public Property Item_number() As String
        Get
            Return _item_number
        End Get
        Set(ByVal value As String)
            _item_number = value
        End Set
    End Property

    Public Property Receipt_id() As String
        Get
            Return _receipt_id
        End Get
        Set(ByVal value As String)
            _receipt_id = value
        End Set
    End Property

    Public Property Handling_amount() As Double
        Get
            Return _handling_amount
        End Get
        Set(ByVal value As Double)
            _handling_amount = value
        End Set
    End Property

    Public Property Transaction_subject() As String
        Get
            Return _transaction_subject
        End Get
        Set(ByVal value As String)
            _transaction_subject = value
        End Set
    End Property

    Public Property Payment_gross() As Double
        Get
            Return _payment_gross
        End Get
        Set(ByVal value As Double)
            _payment_gross = value
        End Set
    End Property

    Public Property Initial_Payment_Amount() As Double
        Get
            Return _initial_payment_amount
        End Get
        Set(ByVal value As Double)
            _initial_payment_amount = value
        End Set
    End Property
End Class
